projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b4bc1b
)
i2c: mv_i2c.c: Correct address endianness
author
Bradley Bolen
<
[email protected]
>
Tue, 13 Dec 2016 17:49:53 +0000
(12:49 -0500)
committer
Heiko Schocher
<
[email protected]
>
Mon, 19 Dec 2016 08:32:00 +0000
(09:32 +0100)
0c0f719ad2f46c8566a56daee37ebdb7c078c3b1
accidentally changed the
endianness of the i2c read and write addresses. This was noticable when
accessing EEPROMs that use 2 byte addressing as the LSB was being sent
first.
Signed-off-by: Bradley Bolen <
[email protected]
>
Reviewed-by: Stefan Roese <
[email protected]
>
drivers/i2c/mv_i2c.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/mv_i2c.c
b/drivers/i2c/mv_i2c.c
index 7f52fa2d858bf42fc5b6cd4d95030d9ff1193bbd..c78027239f2c4d8b4ea0694e7fc0b643c23de378 100644
(file)
--- a/
drivers/i2c/mv_i2c.c
+++ b/
drivers/i2c/mv_i2c.c
@@
-270,7
+270,7
@@
static int __i2c_read(struct mv_i2c *base, uchar chip, u8 *addr, int alen,
msg.condition = I2C_COND_NORMAL;
msg.acknack = I2C_ACKNAK_WAITACK;
msg.direction = I2C_WRITE;
- msg.data =
*(addr++)
;
+ msg.data =
addr[alen]
;
if (i2c_transfer(base, &msg))
return -1;
}
@@
-341,7
+341,7
@@
static int __i2c_write(struct mv_i2c *base, uchar chip, u8 *addr, int alen,
msg.condition = I2C_COND_NORMAL;
msg.acknack = I2C_ACKNAK_WAITACK;
msg.direction = I2C_WRITE;
- msg.data =
*(addr++)
;
+ msg.data =
addr[alen]
;
if (i2c_transfer(base, &msg))
return -1;
}